/**
 * @desc 用于项目UI组件注册、组件样式文件的注册。
 * @author jinzz
 */
import ElementPlus from 'element-plus'
import { App } from 'vue'
import * as ElIconList from '@element-plus/icons-vue'

import VMdEditor from '@kangc/v-md-editor'
import '@kangc/v-md-editor/lib/style/base-editor.css'
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js'
import '@kangc/v-md-editor/lib/theme/style/github.css'
// highlightjs
import hljs from 'highlight.js'
import hljsVuePlugin from '@highlightjs/vue-plugin'
// import 'highlight.js/styles/lioshi.css'


VMdEditor.use(githubTheme, {
  Hljs: hljs
})

const UI = {
  install(app: App) {
    app.use(ElementPlus)
    app.use(VMdEditor)
    app.use(hljsVuePlugin)
    for (const name in ElIconList) {
      app.component(name, ElIconList[name as keyof typeof ElIconList])
    }
  }
}
export default UI
